package com.luzh.myspring.beans.factory.config;

import com.luzh.myspring.beans.BeanException;
import com.luzh.myspring.beans.PropertyValues;

/**
 * bean实例化感知处理器
 */
public interface InstantiationAwareBeanPostProcessor extends BeanPostProcessor {
    /**
     * 实例化后的注解属性处理
     * @param pvs
     * @param bean
     * @param beanName
     * @return
     * @throws BeanException
     */
    PropertyValues postProcessPropertyValues(PropertyValues pvs, Object bean, String beanName) throws BeanException;

    /**
     * 生成早期代理对象
     * @param bean
     * @param beanName
     * @return
     */
    default Object getEarlyBeanReference(Object bean, String beanName) {
        return bean;
    }

}
